package team.se.tms.po;

import lombok.Data;
import team.se.tms.annotation.Number;
import team.se.tms.annotation.Regex;

import java.io.Serializable;


/**
 * 课程资料信息类
 *
 * @author argentum
 * @date 2018/11/28
 */
@Data
public class CourseInfo implements Serializable{

    @Regex("^[A-Za-z0-9]{16}$")
    private String courseId;

    @Regex("/^[0-9]{1,15}$/")
    private String courseNum;

    @Regex("^[\\u4e00-\\u9fa5]{1,15}$")
    private String courseName;

    @Number(min=1,max=8)
    private int courseStartTerm;

    private float courseCredit;

    private float courseHours;

    @Regex("^[\\u4e00-\\u9fa5]{1,10}")
    private String courseType;

    @Regex("^[\\u4e00-\\u9fa5]{1,6}$")
    private String courseAssessmentMethod;

    @Regex("^[a-zA-Z0-9\\u4e00-\\u9fa5]{1,100}$")
    private String courseDescription;

    @Regex("^[1-9]\\d*$")
    private String talentTrainingProgramId;

    @Override
    public String toString() {
        return "CourseInfo{" +
                "courseId='" + courseId + '\'' +
                ", courseNum='" + courseNum + '\'' +
                ", courseName='" + courseName + '\'' +
                ", courseStartTerm=" + courseStartTerm +
                ", courseCredit=" + courseCredit +
                ", courseHours=" + courseHours +
                ", courseType='" + courseType + '\'' +
                ", courseAssessmentMethod='" + courseAssessmentMethod + '\'' +
                ", courseDescription='" + courseDescription + '\'' +
                ", talentTrainingProgramId='" + talentTrainingProgramId + '\'' +
                '}';
    }
}
